#include <stdio.h>
#include <stdlib.h>
#include "struct.h"
#include "display.h"
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int DataIn;
int main(int argc, char *argv[]) {
Head_Config();
	Static_Config_A();
	scanf("%d",&Head_Rmt->Data);
	Static_Config_B();
	Remote=Head_Rmt;	//Initialize for Remote-Link Method
	for(int i=0;i<Head_Rmt->Data;i++){
		scanf("%d",&DataIn);
		if(i==0){ListDefault_Assign(DataIn);}
		Head_Rmt->NodeOpr(&Temp,DataIn);	//Create New Node
		Head_Rmt->ListOpr(&Remote,&Temp);	//Link New Node to List
	}
	RestPter(&Temp);
	Temp=Head_Rmt->Next;
	printf("%s%s",Prompt_Const_5,Prompt_Const_6);
	while(Temp->Next!=NULL){
		printf("%s%d",Pointer,Temp->Data);
		Temp=Temp->Next;
	}
	printf("%s%d",Pointer,Temp->Data); 
	printf("%s%s",Pointer,List_End);
	RestPter(&Temp);
	Head_Hed->Data=1;
	int j=0;			//Preparation for the procedure below 
	for(int i=0;i<Head_Rmt->Data;i++){
		j=0;
		Head_Hed->ListOpr=ExplList;			//Expel the Node Form the Original List--Head_Rmt  
		Head_Hed->ListOpr(&Head_Rmt,&Temp); 
		Head_Hed->ListOpr=HeadLink;			//Link the Expelled Node to the new List--Head_Hed
		Head_Hed->ListOpr(&Head_Hed,&Temp);
		RestPter(&Temp);
		Temp=Head_Hed->Next;
//		Prompt Output Procedure
//		List Out Procedure"Head"
		printf("%s%d%s",Prompt_i_Equal,i,Prompt_Const_5); 
		printf("%s",Prompt_Const_6);
		while(j<Head_Hed->Data){
		//First Stage Output
		printf("%s%d",Pointer,Temp->Data);
			Temp=Temp->Next;	//Pointer Point to the next Node of the list	
			j++;
		}
		RestPter(&Temp);
		while(j<Head_Rmt->Data){
		//Second Stage Output
			printf("%s%d",Pointer,List_Default);
			j++;
		}
		printf("%s%s",Pointer,List_End);
		Head_Hed->Data++;	
	} 
	printf("%s",TheVeryEnd);
	return 0;
}
